package com.jvup.gameshow.view.attributeBinder;

import androidx.databinding.BindingAdapter;

import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;

/**
 * 第三方控件事件扩展绑定适配器
 */
public class ThirdPartyViewEventAdapter {

    @BindingAdapter("onLoadMore")
    public static void setOnLoadMoreListener(SmartRefreshLayout layout, OnLoadMoreListener listener){
        layout.setOnLoadMoreListener(listener);
    }
    @BindingAdapter(value = {"onRefresh"},requireAll = false)
    public static void setOnRefreshListener(SmartRefreshLayout layout, OnRefreshListener onRefreshListener){
        layout.setOnRefreshListener(onRefreshListener);
    }

}
